<template>
    <div>
      <div class="header flex">
        <div style="width: 10%" @click="headerHistory()">
          <img style="width: 1.25rem;height: 1.25rem" src="../assets/img/left.png">
        </div>
        <div style="width: 80%">
          <span style="font-size: 1rem">{{title}}</span>
        </div>
        <div style="width: 10%"></div>
      </div>
    </div>
</template>

<script>
    export default {
        props:['title'],
        data(){
            return{

            }
        },
        methods:{
          headerHistory(){
            this.deleteCache('form');
            this.deleteCache('chooseTickt');
            /*history.go(-1)*/
            window.history.length > 1
              ? this.$router.go(-1)
              : this.$router.push('/')
          }
        }
    }
</script>

<style scoped>
  .header{
    width: 100%;
    padding: 0.5rem;
    display: flex;
    display: -webkit-flex;
    justify-content: center;
    -webkit-justify-content: center;
    align-items: center;
    -webkit-align-items: center;
    border-bottom: 1px solid #c3c3c3;
    background: #fff;
    position: relative;
    height: 45px;
  }
  .header img{
    width: 1.25rem;
    height: 1.25rem;
  }
</style>
